package com.ahs.region.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.ahs.region.model.User;
import com.ahs.region.service.UserService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

@RestController
@RequestMapping("/region")
@Api(description="测试")
@ApiResponses({ @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 401, message = "我也不知道为啥"), @ApiResponse(code = 403, message = "禁止访问"), @ApiResponse(code = 404, message = "请求地址错误") })
public class UserController {

//	private static final Log logger = LogFactory.getLog(UserController.class);
	@Autowired
	private UserService userService;
	
	@ApiOperation(value = "通过经纬度获取区域信息", httpMethod = "GET", notes = "通过经纬度获取区域信息，天气信息")
	@RequestMapping(value = "/findByAll", method = RequestMethod.GET)
	public List<User> findByLnglat(){
			return userService.findAll();
	}
	
	
}
